// import Vue from 'vue'
// import Router from 'vue-router'
// Vue.use(Router)
// export const constantRoutes = [
//   {
//     path: '/login',
//     component: () => import('@/views/login/index'),
//     hidden: true
//  },
// ]

// const createRouter = () =>
//   new Router({
//     // mode: 'history', // require service support
//     scrollBehavior: () => ({ y: 0 }),
//     routes: constantRoutes
//   })

// const router = createRouter()

// // Detail see: https://github.com/vuejs/vue-router/issues/1234#issuecomment-357941465
// export function resetRouter() {
//   const newRouter = createRouter()
//   router.matcher = newRouter.matcher // reset router
// }

// export default router



import Vue from 'vue'
import Router from 'vue-router'
import login from '@/views/login/index.vue'
import echarts from '@/views/echarts/index.vue'
import asdasa from '@/views/asdasa/index.vue'
import aaa from '@/views/asdasa/aaa/index.vue'
import bbb from '@/views/asdasa/bbb/index.vue'
// import Laxin from '@/views/top/top.vue'
Vue.use(Router)
 
export default new Router({
  routes: [
    {
      path: '/',
      component: login,
    }
    ,{
      path: '/echarts',
      component: echarts,
    },
    {
      path: '/asdasa',
      component: asdasa,
      children: [
        {
          path: 'aaa/:id',
          name: 'aaa',
          component: aaa,
        },
        {
          path: 'bbb',
          name: 'bbb',
          component: bbb,
        }
      ]
    }
  ]
})